<template>
	<body-wrap>
		<view class="ewmbox">
			<cm-image :src="`${BASE_PATH}/boss/ask/get/qrcode?con=http://mobile.ej12366.video/applet/company/join?companyId=${companyId}&name=${companyName}`"/>
		</view>
		<view class="mstxt">
			长按二维码分享给好友，好友扫码后即可加入，<br/>并可以在平台上使用该咨询包
		</view>
	</body-wrap>
</template>

<script>
	import {defineComponent,reactive,toRefs,onMounted,getCurrentInstance,computed} from 'vue'
	import {onLoad,onShow} from '@dcloudio/uni-app'
	import { useStore } from 'vuex'
	import bodyWrap from "@/components/bodyWrap/index.vue"
	import cmImage from "@/components/cmImage/index.vue"
	import {getOrderList} from "@/api/consult.js"
	import {toast,dateFormat} from '@/utils/common.js'
	import empty from "@/components/empty/index.vue"
	import {BASE_PATH} from "@/utils/config.js"
	export default defineComponent({
		components:{
			bodyWrap,
			cmImage,
			empty
		},
		props:{
		
		},
		setup(props,context) {
			const store = useStore()
			const {proxy} = getCurrentInstance()
			
			const state = reactive({
				userInfo:computed(()=>store.state.base.userInfo),
				companyName:'',
				companyId:''
			})
			
			onLoad(options=>{
				if(options && options.companyId){
					state.companyId = options.companyId
					state.companyName = options.name
				}
				console.log("rrrr:",state.companyId,state.companyName)
				//get_order_list()
			})
			
			onMounted(async ()=>{
				
			})
			
			const get_order_list = async ()=>{
				let params = {
					couponOrderId: state.orderId,
					pageIndex:state.pageIndex,
					pageSize:state.pageSize,
					status:1,
					payType: 6, // 6咨询包抵扣
				}
				const res = await getOrderList(params)
				state.lists = res.data.data || []
			}

			
			return {
				...toRefs(state),
				dateFormat,
				BASE_PATH
			}
		}
	})
</script>

<style lang="scss" scoped>
	.ewmbox{
		margin: 0 auto;
		margin-top: 30rpx;
		width: 400rpx;
		height: 400rpx;
	}
	.mstxt{
		text-align: center;
		padding:20rpx 50rpx;
		color: green;
		line-height: 40rpx;
	}
</style>
